﻿using System.Text;
using System.Collections.Specialized;

namespace Codeplus.Library.Web
{
    public class Webrequest
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="collection"></param>
        /// <returns></returns>
        public static string ParseServerVariables(NameValueCollection collection)
        {
            var serverVariables = new StringBuilder();
            var keys = collection.AllKeys;
            foreach (var key in keys)
            {
                serverVariables.AppendFormat("<br/><hr/>[{0}]:[{1}]", key, collection.Get(key));
            }
            return serverVariables.ToString();
        }
    }
}
